<div class="menu">
	<div align="right" style="font-weight:bold; font-size:12px; padding-bottom:8px; color:#10498A;">
		<?php echo $this->Access->getMyRole($this->Access->getMy('group_id')).": ".$this->Access->getMy('nombre_completo');?>
	</div>
	<div class="desplegable">
		<?php  $this->Form->new_menu($this->Access->getMy('id'),$this->Access->getMy('group_id'));?>
	</div>
</div>
<div class="apoyos index">
	<h2><?php __('Apoyos Familiares');?></h2>
	<h4><?php __('Estudiante: '.$nombre_estudiante);?></h4>
	<table>
		<tr>
			<td class="actions_2"><?php echo $this->Html->link(__('Agregar Apoyo Familiar', true), 
				array('action' => 'add', $estudiante_id, $user_id)); ?></td>
			<td class="actions_2"><?php echo $this->Html->link(__('Apoyos Estudiantes', true), 
				array('action' => 'apoyos_estudiantes', $circulo_estudiante)); ?></td>
			<td class="actions_2"><?php echo $this->Html->link(__('Apoyos Circulos', true), 
				array('action' => 'apoyos_circulos')); ?></td>
		</tr>
	</table>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('Asesor');?></th>
			<th><?php echo $this->Paginator->sort('persona_visita');?></th>
			<th><?php echo $this->Paginator->sort('parentesco');?></th>			
			<th class="actions"><?php __('Acciones');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($apoyos as $apoyo):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo $this->Html->link($apoyo['User']['nombre_completo'], array('controller' => 'users', 'action' => 'view', $apoyo['User']['id'])); ?>
		</td>
		<td><?php echo $apoyo['Apoyo']['persona_visita']; ?>&nbsp;</td>
		<td><?php echo $apoyo['Apoyo']['parentesco']; ?>&nbsp;</td>		
		<td class="actions">
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $apoyo['Apoyo']['id'], $estudiante_id, $user_id));
				if($group_id=="1"){
					echo $this->Html->link(__('View', true), array('action' => 'view', $apoyo['Apoyo']['id']));
					echo $this->Html->link(__('Delete', true), array('action' => 'delete', $apoyo['Apoyo']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $apoyo['Apoyo']['id']));
				} 
			?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('P&aacute;gina %page% de %pages%, mostrando %current% regristros de %count% en total, empieza con el registro %start%, termina en %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>